{extend name="../../common/view/public/base" /}

{block name="title"}订单{/block}

{block name="head"}<script type="text/javascript" src="static/yj.admin.ui/js/jquery/number.js?{:staticCache()}"></script>
<link rel="stylesheet" type="text/css" href="static/library/lay_ui/css/date.css?{:staticCache()}">
<link rel="stylesheet" type="text/css" href="static/admin/css/{:parse_name(request()->controller())}.css?{:staticCache()}">
<script type="text/javascript">
CONFIG['TYPE'] = 'day';
CONFIG['PAGE_SIZE'] = {:config('app.page_size')};
CONFIG['TOTAL'] = {$Total};
CONFIG['LIST'] = window.location;
CONFIG['OUTPUT'] = '{:url("/".parse_name(request()->controller())."/output")}{$Param}';
</script>{/block}

{block name="main"}
<div class="tool advance">
  <div class="row1">
    <h2>订单统计</h2>

    <ul class="tab">
      {if condition="isPermission('index')"}<li><a href="{:url('/'.parse_name(request()->controller()).'/index')}">概况</a></li>{/if}
      {if condition="isPermission('day')"}<li class="active"><a href="{:url('/'.parse_name(request()->controller()).'/day')}">按天</a></li>{/if}
      {if condition="isPermission('month')"}<li><a href="{:url('/'.parse_name(request()->controller()).'/month')}">按月</a></li>{/if}
      {if condition="isPermission('year')"}<li><a href="{:url('/'.parse_name(request()->controller()).'/year')}">按年</a></li>{/if}
    </ul>

    <div class="button">
      {if condition="isPermission('output')"}<input type="button" value="导出统计结果" class="button output">{/if}
    </div>

    <p class="clear"></p>
  </div>

  {include file="order/search" /}
</div>

<div class="list">
  {if condition="$Total>0"}
  <table>
    <thead>
      <tr class="row1"><th style="width:120px;" rowspan="2"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=0">时间</a></th><th colspan="6">订单数（单位：笔）</th><th colspan="6">订单金额（单位：元）</th><th colspan="4">合计</th></tr>
      <tr><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=1">待支付</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=2">待发货</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=3">已发货</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=4">已签收</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=5">售后中</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=6">交易关闭</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=7">待支付</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=8">待发货</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=9">已发货</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=10">已签收</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=11">售后中</a></th><th style="width:80px;"><a href="{:url('/'.parse_name(request()->controller()).'/'.request()->action())}{$Param}&order=12">交易关闭</a></th><th style="width:80px;">订单数</th><th style="width:80px;">成交数</th><th style="width:80px;">订单金额</th><th style="width:80px;">成交金额</th></tr>
    </thead>
    <tbody class="items"></tbody>
  </table>

  <div class="pagination"><ul></ul></div>
  {else/}
  <p class="nothing"></p>
  {/if}
</div>
{/block}

{block name="right"}
<div class="right">
  <h3>温馨提示 <span class="iconfont icon-fold"></span></h3>
  <ul>
    <li>1、成交数和成交金额不计算交易关闭的订单；</li>
    <li>2、点击表头中的链接可进行排序操作。</li>
  </ul>

  <span class="iconfont icon-expand color"></span>
</div>
{/block}